/**  
*  Doku2Buddy - A DokuWiki to BuddyPress Wiki-Component Converter
*  Copyright (C) 2010 Skye Book
*  
*  This program is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*  
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*  
*  You should have received a copy of the GNU General Public License
*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
package com.sbook.d2b.db;

/**
 * @author Skye Book
 *
 */
public class WPConstants {
	private static String wpPrefix = "wp_";
	
	public void setWPPrefix(String prefix){
		wpPrefix=prefix;
	}
	
	public static String POSTS_TABLE(){
		return "`"+wpPrefix+"posts`";
	}
	public static final String POSTS_AUTHOR = "`post_author`";
	public static final String POSTS_DATE = "`post_date`";
	public static final String POSTS_DATE_GMT = "`post_date_gmt`";
	public static final String POSTS_CONTENT = "`post_content`";
	public static final String POSTS_TITLE = "`post_title`";
	public static final String POSTS_EXCERPT = "`post_excerpt`";
	public static final String POSTS_STATUS = "`post_status`";
	public static final String POSTS_COMMENT_STATUS = "`comment_status`";
	public static final String POSTS_PING_STATUS = "`ping_status`";
	public static final String POSTS_PASSWORD = "`post_password`";
	public static final String POSTS_NAME = "`post_name`";
	public static final String POSTS_TO_PING = "`to_ping`";
	public static final String POSTS_PINGED = "`pinged`";
	public static final String POSTS_MOD_DATE = "`post_modified`";
	public static final String POSTS_MOD_DATE_GMT = "`post_modified_gmt`";
	public static final String POSTS_CONTENT_FILTERED = "`post_content_filtered`";
	public static final String POSTS_PARENT = "`post_parent`";
	public static final String POSTS_GUID = "`guid`";
	public static final String POSTS_MENU_ORDER = "`menu_order`";
	public static final String POSTS_TYPE = "`post_type`";
	public static final String POSTS_MIME_TYPE = "`post_mime_type`";
	public static final String POSTS_COMMENT_COUNT = "`comment_count`";
	
	public static String GROUP_META_TABLE(){
		return "`"+wpPrefix+"bp_groups_groupmeta`";
	}
	
	public static final String GROUP_META_ENTRY_ID = "`id`";
	public static final String GROUP_META_GROUP_ID = "`group_id`";
	public static final String GROUP_META_KEY = "`meta_key`";
	public static final String GROUP_META_VALUE = "`meta_value`";
	// Not the name of a field, so no tilde.
	public static final String GROUP_WIKI_ENTRY_ID_META_KEY = "'bp_wiki_group_wiki_page_ids'";
	
	public static final String GROUP_NAME = "name";
	
	public static String BP_GROUPS_TABLE(){
		return "`"+wpPrefix+"bp_groups`"; 
	}
	
	public static String BP_ACTIVITY_TABLE(){
		return "`"+wpPrefix+"bp_activity`";
	}
	
	public static final String BP_ACTIVITY_ID = "`id`";
	public static final String BP_ACTIVITY_USER_ID = "`user_id`";
	public static final String BP_ACTIVITY_COMPONENT = "`component`";
	public static final String BP_ACTIVITY_TYPE = "`type`";
	public static final String BP_ACTIVITY_ACTION = "`action`";
	public static final String BP_ACTIVITY_CONTENT = "`content`";
	public static final String BP_ACTIVITY_PRMRY_LNK = "`primary_link`";
	public static final String BP_ACTIVITY_ITEM_ID = "`item_id`";
	public static final String BP_ACTIVITY_SECONDARY_ITEM_ID = "`secondary_item_id`";
	public static final String BP_ACTIVITY_DATE_RECORDED = "`date_recorded`";
	public static final String BP_ACTIVITY_HIDE_SITEWIDE = "`hide_sitewide`";
	public static final String BP_ACTIVITY_MPTT_L = "`mptt_left`";
	public static final String BP_ACTIVITY_MPTT_R = "`mptt_right`";
}
